﻿using System.Data.Entity;

namespace Healinker.Entities
{
    public interface IDbContext
    {
        IDbSet<TEntity> Set<TEntity>() where TEntity : class;
        int SaveChanges();
    }

    public partial class HealinkerContext : DbContext, IDbContext
    {
        public HealinkerContext()
            : base( "name=HealinkerContext" )
        {
        }

        public DbSet<DiseaseClass> DiseaseClasses { get; set; }
        public DbSet<CodeClass> CodeClasses { get; set; }
        public DbSet<Disease> Diseases { get; set; }
        public DbSet<DiseaseCause> DiseaseCauses { get; set; }
        public DbSet<Treatment> Treatments { get; set; }
        public DbSet<Symptom> Symptoms { get; set; }
        public DbSet<Medication> Medications { get; set; }
        public DbSet<LinkArticle> LinkArticles { get; set; }
        public DbSet<DiseaseMedication> DiseaseMedications { get; set; }
        public DbSet<DiseaseComplication> DiseaseComplications { get; set; }
        public DbSet<DiseaseSymptom> DiseaseSymptoms { get; set; }

        public new IDbSet<TEntity> Set<TEntity>() where TEntity : class
        {
            return base.Set<TEntity>();
        }
    }
}
